public class Try_Catch {
    public static void main(String[] args) {
        System.out.println(get2());

    }

    public static int get1(){
        int a = 10;
        try {
            System.out.println(a/0);
            a = 20;
        } catch (Exception e) {
            a = 30;
            return a;  // 30
        } finally {
            a = 40;
        }
        return a;
    }

    public static int get2(){
        int a = 10;
        try {
            System.out.println(a/0);
            a = 20;
        } catch (Exception e) {
            a = 30;
            return a;
        } finally {
            a = 40;
            return a;  // 40
        }

    }
}
